#!/bin/sed -nrf

# get subject from a git-format patch file

/^Subject:/ {
h
n
/^ .*/ {
H
g
s/\n//
s/^Subject:[^]]+\] (.*)$/\1/
p
Q
}
g
s/^Subject:[^]]+\] (.*)$/\1/
p
}
